// 引入颜色公共样式
@import "../../style/common.less";

.fun-box {
  display: block;
  margin: 0 12px 12px;
  background-color: @fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
  > .title {
    font-size: 0.8rem;
    font-weight: 400;
    display: block;
    padding: 10px 12px;
    height: 40px;
    line-height: 20px;
    color: @primary;
    ::before {
      content: "";
      display: inline-block;
      width: 3px;
      height: 20px;
      background-color: @primary;
      margin-right: 12px;
      vertical-align: bottom;
    }
  }
  .box {
    display: block;
    position: relative;
    .clear();
    padding: 8px;
    border-top: 1px solid @cdd;
    > .item {
      float: left;
      width: 25%;
      > .icon {
        display: block;
        width: 56px;
        height: 56px;
        margin: auto;
        background-position: center;
        background-size: 36px;
        background-repeat: no-repeat;
        .loop();
        // &.a{ background-image: url("../../image/icon/a.png");}
      }
      > .text {
        display: block;
        text-align: center;
        font-size: 0.7rem;
        color: @primary;
      }
    }
  }
}
// 样式递归方法，使用图片名字来做参数 用一个空格隔开
@icons: a b c d e f h i j k g;
// // less数组中去数值是从1开始
 .loop(@index: 1) when(@index <= length(@icons)) {
  // 读取数组中的数值
  @icon: extract(@icons, @index);

  &.@{icon} {
      background-image: url("../../image/icon/@{icon}.png");
  }
  .loop(@index + 1);
}

.chart-list{
    display: block;
    height: 260px;
    position: relative;
    >.chart-box{
      height: 100%;
      width: 100%;
    }
}
